[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Strip


Purpose   Removes a character from a string.

Decln.    Strip(L,C:char;Str:string):string;

Returns   String

Remarks   L is a character indicating which part of the string to strip:
          'L'  strip all leading characters
          'R'  strip all trailing characters
          'B'  strip both leading and trailing characters
          'A'  strip all occurrences of the character
          C    is the character to strip
          Str  is the source string

Example

VAR
   TTT1, TTT2, TTT3, TTT4 : STRING;
BEGIN
    TTT1 := STRIP('L',' ','   THIS IS NEAT   ');
    TTT2 := STRIP('R',' ','   THIS IS NEAT   ');
    TTT3 := STRIP('B',' ','   THIS IS NEAT   ');
    TTT4 := STRIP('A',' ','   THIS IS NEAT   ');
END;

The strings will be assigned the following characters:
TTT1 "This is neat    "
TTT2 "    This is neat"
TTT3 "This is neat"
TTT4 "Thisisneat"

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson